<div id="tiga_ba">
	<div id="tiga_baa">Ubah Data Pengguna</div>
	<div id="tiga_bab"></div>
	<div class="clear"></div>
</div>
            
<?php
	$id=$_GET['id'];
	$sql="select id_pengguna, login, nama, id_jenis_pengguna, is_aktif,id_ppk from pengguna where id_pengguna = $id";
	$qry=mysql_query($sql);
	$hasil=mysql_fetch_array($qry);
?>
<form action="utama.php?module=mod_user&act=update" onsubmit="return gsValidate('username|nama','Username Harus Diisi|Nama Harus Diisi','required|required');" method="post" enctype="multipart/form-data">
	<table style="margin: 10px 15px 10px 15px;">
		<tr>
			<td>Username</td>
			<td>&nbsp;</td>
			<td>
				<input name="username" type="text" class="input2" readonly="readonly" id="username" value="<?php echo $hasil['login']?>" size="30" maxlength="40" />
				<input name="id_pengguna" type="hidden" id="id_pengguna" value="<?php echo $hasil['id_pengguna']?>" />
				<span class="red">*</span>
			</td>
		</tr>
		<tr>
			<td>Password</td>
			<td>&nbsp;</td>
			<td>
				<input name="password" type="password" class="input2" id="password" maxlength="200" />*) Silahkan dikosongkan apabila tidak ganti password
			</td>
		</tr>
		<tr>
			<td>Nama</td>
			<td>&nbsp;</td>
			<td>
				<input name="nama_lengkap" type="text" class="input2" id="nama" maxlength="200" value="<?php echo $hasil['nama']?>"/>
				<span class="red">*</span>
			</td>
		</tr>
		<tr>
			<td>Kantor</td>
			<td>&nbsp;</td>
			<td>
				<select name="kantor" class="input2" id="kantor">
					<option value="0"> Jamkesda </option>
					<?php
						$kantor = mysql_query("select id_ppk,nama from ppk");
						while($k = mysql_fetch_array($kantor)){
							if($k['id_ppk'] == $hasil['id_ppk']){
								$s = "selected";
							}else{
								$s = "";
							}
							echo "<option value=$k[id_ppk] $s>$k[nama]</option>";
						}
					?>
				</select>
			</td>
		</tr>
		<tr>
			<td>Level</td>
			<td>&nbsp;</td>
			<td>
				<select name="level" id="level" class="input2">
					<?php
						$level = mysql_query("select * from jenis_pengguna");
						while($l = mysql_fetch_array($level)){
							if($l['id_jenis_pengguna'] == $hasil['id_jenis_pengguna']){
								$s = "selected";
							}else{
								$s = "";
							}
							echo "<option value='$l[id_jenis_pengguna]' $s>$l[nama]</option>";
						}
					?>
				</select>
			</td>
		</tr>
		<tr>
			<td>Status</td>
			<td>&nbsp;</td>
			<td>
				<select name="status" id="status" class="input2">
					<?php
						if($hasil['is_aktif'] == 'Y'){
							$ak = "selected";
							$ta = "";
						}else{
							$ak = "";
							$ta = "selected";
						}
						echo "<option value='Y' $ak>Aktif</option>";
						echo "<option value='N' $ta>Tidak Aktif</option>";
					?>
				</select>
			</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td><input name="submit" type="submit" class="button" value="Ubah" /></td>
		</tr>
	</table>
</form>		
            
        